/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package heart_0812025;

import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Insets;
import java.util.concurrent.CountDownLatch;
import javax.imageio.ImageIO;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.border.Border;

/**
 *
 * @author BAO
 */
public class GUI {
    public static JFrame container;
    public static JPanel panel_menu;
    public static JScrollPane JoinGame;
    public static JPanel CreateGame;
    public static JPanel Option;
    public static JPanel maingame;

    public GUI()
    {
        container = new JFrame("0812025");
        container.setLayout(new FlowLayout());
       
        container.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        panel_menu = new JPanel();
        panel_menu.setLayout(new BoxLayout(panel_menu, BoxLayout.Y_AXIS));
        
        // add button for menu
        ImageIcon create = new ImageIcon("src/Images/create_icon.png");
        JButton CreateG =  new JButton("CREATE GAME", create);
        CreateG.setPreferredSize(new Dimension(250, 36));

        ImageIcon join = new ImageIcon("src/Images/join_game.png");
        JButton JoinG =  new JButton("JOIN GAME", join);

        ImageIcon option = new ImageIcon("src/Images/option.png");
        JButton OptionGame =  new JButton("OPTION", option);
        OptionGame.setPreferredSize(new Dimension(50, 36));
        
        ImageIcon exit = new ImageIcon("src/Images/exit.png");
        JButton ExitGame =  new JButton("EXIT", exit);
        ExitGame.setPreferredSize(new Dimension(250, 36));

        panel_menu.add(CreateG);
        panel_menu.add(Box.createRigidArea(new Dimension(5, 5)));
        panel_menu.add(JoinG);
        panel_menu.add(Box.createRigidArea(new Dimension(5, 5)));
        panel_menu.add(OptionGame);
        panel_menu.add(Box.createRigidArea(new Dimension(5, 5)));
        panel_menu.add(ExitGame);
        container.add(panel_menu);
        
        //
        CreateGame = new JPanel();

        container.pack();
        container.setVisible(true);
    }
}
